package ams.model.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name = "t_org")
public class Org {

	// 机构ID
	private Integer id;
	// 父机构ID
	private Integer pid;
	// 机构名称
	private String name;
	// 机构编码
	private String code;
	// 机构描述
	private String description;
	// 是否为叶子节点
	private String state;

	public Org() {}


	public Org(Integer id, Integer pid, String name, String state) {
		super();
		this.id = id;
		this.pid = pid;
		this.name = name;
		this.state = state;
	}




	@Id
	@GeneratedValue
	@Column(name = "id")
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "pid")
	public Integer getPid() {
		return pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	@Column(name = "name", nullable = false)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "code", nullable = false)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Column(name = "description")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "state")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}


	
}
